<?php

use Illuminate\Routing\Router;

Admin::routes();
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    //用户管理
    $router->resource('/auth/users', UserController::class);
    //角色管理
    $router->resource('/auth/roles', RoleController::class);
    //人员责任分类
    $router->get('/portrait/business_role_form', 'RoleController@businessRoleManage')->name('role.business_role_form');
    $router->get('/portrait/business_role_form/{id}/edit', 'RoleController@businessRoleManage');
    $router->post('/portrait/business_role_manage', 'RoleController@businessRoleSave')->name('role.business_role_save');
    //部门管理
    $router->get('/portrait/departments/getDepartment', 'DepartmentController@getDepartment')->name('department.select');
    $router->resource('/portrait/departments', DepartmentController::class);
    //业务类型管理
    $router->resource('/portrait/business-categories', BusinessCategoryController::class);
    //业务项目管理
    $router->get('/portrait/businesses/getBusiness', 'BusinessController@getBusiness')->name('business.select');
    $router->resource('/portrait/businesses', BusinessController::class);
    //任务计划管理
    $router->resource('/portrait/tasks', TaskController::class);
    //评价标准管理
    $router->resource('/portrait/standards', StandardController::class);
    //数据记录管理
    $router->resource('/portrait/records', RecordController::class);
});

